/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author cegarciaa
 */
@Embeddable
public class VarbdPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IDDISPOSITIVO")
    private long iddispositivo;
    @Basic(optional = false)
    @Column(name = "IDVARIABLEB")
    private long idvariableb;

    public VarbdPK() {
    }

    public VarbdPK(long iddispositivo, long idvariableb) {
        this.iddispositivo = iddispositivo;
        this.idvariableb = idvariableb;
    }

    public long getIddispositivo() {
        return iddispositivo;
    }

    public void setIddispositivo(long iddispositivo) {
        this.iddispositivo = iddispositivo;
    }

    public long getIdvariableb() {
        return idvariableb;
    }

    public void setIdvariableb(long idvariableb) {
        this.idvariableb = idvariableb;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) iddispositivo;
        hash += (int) idvariableb;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VarbdPK)) {
            return false;
        }
        VarbdPK other = (VarbdPK) object;
        if (this.iddispositivo != other.iddispositivo) {
            return false;
        }
        if (this.idvariableb != other.idvariableb) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.VarbdPK[iddispositivo=" + iddispositivo + ", idvariableb=" + idvariableb + "]";
    }

}
